$OpenBSD: patch-gcc-4_3_4_gcc_config_avr_libgcc_S,v 1.1 2010/06/27 20:58:10 ckuethe Exp $
--- gcc-4.3.4/gcc/config/avr/libgcc.S.orig	Sat Jan 19 05:15:02 2008
+++ gcc-4.3.4/gcc/config/avr/libgcc.S	Sat Jun 26 11:58:40 2010
@@ -594,7 +594,12 @@ __prologue_saves__:
 	out	__SP_H__,r29
 	out	__SREG__,__tmp_reg__
 	out	__SP_L__,r28
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+	eijmp
+#else
 	ijmp
+#endif
+
 .endfunc
 #endif /* defined (L_prologue) */
 
@@ -674,13 +679,22 @@ __tablejump__:
 	lpm	__tmp_reg__, Z+
 	lpm	r31, Z
 	mov	r30, __tmp_reg__
+
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+	eijmp
+#else
 	ijmp
+#endif
+
 #else
 	lpm
 	adiw	r30, 1
 	push	r0
 	lpm
 	push	r0
+#if defined (__AVR_HAVE_EIJMP_EICALL__)
+        push    __zero_reg__
+#endif
 	ret
 #endif
 	.endfunc
